# frozen_string_literal: true

class RemoveAgeMeanAgeSumOfSquaresRiskScoreFromVulnerabilityStatistics < Gitlab::Database::Migration[2.3]
  milestone '18.7'

  def up
    remove_column :vulnerability_statistics, :age_mean
    remove_column :vulnerability_statistics, :age_sum_of_squares
    remove_column :vulnerability_statistics, :risk_score
  end

  def down
    add_column :vulnerability_statistics, :age_mean, :float, null: false, default: 0
    add_column :vulnerability_statistics, :age_sum_of_squares, :float, null: false, default: 0
    add_column :vulnerability_statistics, :risk_score, :float, null: false, default: 0
  end
end
